Based on what I have, I currently have this as the Pirates’ 40-man roster (note that the names are in no particular order):
Starting pitchers: Roansy Contreras, Mitch Keller, Luis Ortiz, Johan Oviedo, JT Brubaker, Bryse Wilson, Mike Burrows, Miguel Yajure, Zach Thompson, Max Kranick
Relief Pitchers: David Bednar, Yerry De Los Santos, Colin Holderman, Wil Crowe, J.C. Flowers, Tahnaj Thomas, Manny Banuelos, J.C. Flowers, Chase DeJong, Robert Stephenson, Blake Cederlind
Catchers: Tyler Heineman, Jason Delay, Endy Rodriguez, Blake Sabol
Infielders: Malcolm Nunez, Oneil Cruz, Ke’Bryan Hayes, Ji-Hwan Bae, Liover Peguero, Jared Triolo, Hoy Park, Tucupita Marcano
Outfielders: Jack Suwinski, Bryan Reynolds, Travis Swaggerty, Cal Mitchell, Matt Gorski, Canaan Smith-Njigba, Miguel Andujar
In total, that is 39 players. That leaves the Pittsburgh Pirates one 40-man roster spot for a trade or free agent acquisition (assuming, in the event of an exchange, a player from the 40-man roster is not involved) before the roster needs to be finalized or a Rule 5 Draft pick.
Sometimes, teams don’t leave a roster spot open for a Rule 5 Draft pick or completely forgo selecting a player. In the 2020-2021 off-season, only 18 teams picked players. The last time there were at least 20 teams picking players in the Rule 5 Draft was in 2008. The Pirates themselves went without a Rule 5 pick in both 2018 and 2019.