logging the pir trigger count