Probably over 40 pairs.
I go through phases on some, and come back to them again as life patterns change. Some are "occasion" shoes, that get worn rarely but I do wear them enough to warrant keeping them. And I tend to give them a lot of wear before I will give up on a pair (plenty of heeling/soling over the years, DH does a good polishing job regularly etc).
My main pairs at the moment are:
1 pair flats for daily commute (and occasionally stay on in office)
1 pair black heels under desk for work
1 pair navy heels for work/socializing
1 pair black heels at home for socializing
2 pairs hiking boots (1 replacement pair getting worn in, older pair no longer good in wet conditions but still good in dry)
1 pair runners
2 pairs flats for weekend - 1 boat shoe, 1 loafer
2 pairs flat boots - 1 casual, 1 more formal
1 pair heeled boots
1 pair Crocs flip flops (and 2 other pairs flip flops) for around house and summer wear
I wear a few more pairs of heels from time to time, but less frequently. Some black, some coloured. And I have another 2 pairs of casual boots that I am not so in love with this year but not for throwing away yet. Ski boots are only taken out in snow conditions. Hiking sandals are rarely worn due to lack of decent sunshine here, but will never go "out of fashion" for their use. I have to go between very formal (sometimes skirts/dresses, sometimes trousers) to smart casual at work, and a wide range of uses outside of work too, many are well worn but classic styles that last years. So I don't think I have an unreasonable collection.
I do need wellies. And a replacement pair of flats for 1 weekend pair )loafers). And will need replacement formal heeled boots next winter (current pair are 11 years old).