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.