What you need:
Microphone for recording ( I use a simple USB mic)
and Audacity, which can be downloaded free here:
Step 1: Record the Gun
It should look like the picture below.
Each large peak represents the gun firing. small peaks in between are the guns parts moving. only count the large peaks.
Step 2: Analyze Data
1:Count all the peaks and divide that number by the total length of your sample ( in seconds)
2: take a one second sample of the data and count the peaks in it
In both cases, the resulting number will be your ROF in shots per second ( or hertz, if you like )
to get rounds per minute, multiply by 60
the sample below yielded a time interval of 1.95 seconds and 39 shots, giving a ROF of 20 rounds per second, or 1200 rounds per minute