A novel method for pedestrian counting using passive infrared (PIR) sensors is proposed and the corresponding system has been designed and developed. The inclusion of an environmental combo sensor in the proposed pedestrian counting system enabled environmental monitoring such as temperature, humidity, pressure, Carbon di Oxide (CO2) and Total Volatile Organic Component (TVOC). The detection lengths of the PIR sensors are varied by tuning the Field of View (FoV) of the Fresnel lens to differentiate the movements of humans and animals. A novel method is applied to locate the PIR sensors in the designed mould so that their coverage regions do not overlap. The sensor data are transmitted to the Thingspeak server via Long Range Wide Area Network (LoRaWAN) communication protocol. The system is powered by a 6000 mAh rechargeable battery which is charged by the solar panel during day time enabling continuous data collection. The system's results are validated against manual counting and it is seen that more than 90% accuracy can be achieved by this intelligent system.