I'm curious to see what @LibraSun came up with as something like this has been asked for before but it wasn't really do-able without some shortfalls. More specifically, the 10 minute windows wouldn't be floating, but would be static cycles; e.g., 5:00-5:10, 5:10-5:20, etc. So you'd possibly miss events. If you had five come in between 5:05-5:10 and five more 5:10-5:15, it wouldn't trigger.
More on point to what you're trying to do, there's a community app that I think would fit the bill. It was meant for bathrooms, but I don't see why it wouldn't fit your need.