3 can go into a hive at one time, so making a farm is most optimal at 6 bees, 3 outside working, and three in the nest, then i think its around 2700 ticks (if my math is right that should add up to 2 and a half mins) the bees will swap places.
You could do a controlled test. Be in creative, have one beehive or nest in a closed space, place flowers and bees (one bee at a time) then you can keep count of how many will go in the hive/nest. At night they should all enter one until it's full.
The data of the beehive doesn't give u a number, but there is a more intuitive way to see how many bees are in a nest. /Data get block <x> <y> <z> Bees
The command will either return a 0 or a 3, if it's three then there's a at least 1 bee in there. If there is, then repeat the command again, but replace the 0 with a 1, and so on, until you do it 3 times. Then the number of bees will be how many of the 3 commands returned the number 3.