Electrochemical sensor for indirect detection of bacterial population