Create graph of count if sample date between two SQL column dates

Hi, this sounds a bit simple I know but I just can’y make it fly.
We have an SQL database with work history entries for “startDate” and “endDate” representing when staff come and go.
I want a query which will graph a count of how many users there were on each day, i.e.
COUNT (id) from sometable WHERE $sampletime BETWEEN startDate AND endDate;
How do I represent $sampletime? I have tried $__from and $__to and other built-ins but not getting what I am looking for.
Any help appreciated!