I think the answer will depend on what you mean by underwater photography. Carrying a gopro on a stick is a very different thing than diving with a full kit with tray and dual lights and strobes, with macro and WA swap-able lenses. The amount of dive time will also vary by person. Before you branch out from gopros I would say you need to be able to do a few things consistently and without much thought.
Buoyancy is key. You need to be able to maintain your buoyancy even when other things are happening to divert your attention. Particularly early on with photography, trying to figure out the settings and just working the camera takes a lot of focus and with newer divers once they pay attention to that, buoyancy and situational awarness start to fall apart. Once you can keep buoyancy when task loaded that's one sign you are ready
Situational awareness. Photography can consume most of the attention your brain can give it until certain things become ingrained through experience and muscle memory. That goes for the physical muscle memory of working your gear and your camera as well as the familiarity to be able to do both without much thought.
You should be able to function all your normal dive gear quickly and easily without much thought. S drills, lost mask, reg recovery, etc should be very proficient, and you can do them at any time. Adding a camera system in the middle of these can cause real problems if this isn't able to be handled quickly and easily without much thought.
It really helps to get very very familiar with any camera system on the surface, and then with a few shallow dives to work out where your problem areas will be.
Each person is going to reach this experience level at different times so its hard to say X number of dives will get you there. If you are diving with a group of divers and one or more is mentoring you, ask them to help you work on some task loading exercises, and work through any buoyancy issues when doing them. You can work on camera familiarity on land. Also if someone in your group shoots, see if you can buddy with them and them let you shoot on a dive to see where you are. If things get to be too much work out a plan to just hand stuff off.