API: number of days with measurement records

When using the API, is there a way to have the value returned for the number of days that contain measurements in a given daterange?

In my spreadsheet I want a column for average visits per day for a given month. However, a couple of days/weeks seem to have not been measured in the past (wrong implementation, our servers down, who knows), resulting in measurement gaps. This will skew the outcome of a plain formula like total visits/number of days in a month, so looking for the number of days that are actually measured.

Thanks in advance!