Battery optimized people counting using FIR and AI