count is working for interrupt