'Return the number of hits in the past 5 minutes.
@param timestamp - The current timestamp (in seconds granularity).
:type timestamp: int
:rtype: int'

def getHits(self, timestamp):

    while (self.__dq and (self.__dq[0][0] <= (timestamp - self.__k))):
        self.__count -= self.__dq.popleft()[1]
    return self.__count
