Optimization of an electrochemical sensor for detection of bacterial population