'How to count how many clients are on an access point?

I am currently working on an art project that requires me to count the number of people in a given area, I have done some research and found that a good way to get a rough estimate on how many people are in a given area is to count how many user are attempting to access a router via DHCP requests. I have a router and have also found that with the use of hostasp i can potentially create an access point on a linux system but no clue how i can retrive this number and store it in a variable to then use in a script. Any help anyone can offer would be greatly appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source