Traffic monitoring is essential for intelligent transportation systems, but manual vehicle counting is inefficient and prone to human error in high-density traffic. Although deep learning methods have improved automation, limited studies have explored low-cost embedded deployment and the trade-off between full-precision and hardware-accelerated inference on Raspberry Pi systems. This study proposes a real-time YOLOv8n-based vehicle detection and counting system with SORT tracking and line-crossing, deployed on a Raspberry Pi 5 with a Hailo-8L AI accelerator. The system is evaluated using prerecorded traffic videos under varying conditions, comparing FP32 CPU inference with INT8 HEF hardware-accelerated inference. Performance was assessed using mAP@0.5, counting accuracy, inference latency, FPS, and computational efficiency. The trained YOLOv8n model achieved an mAP@0.5 of 95.2% on the test dataset. Experimental results showed that the PyTorch implementation achieved a counting accuracy of up to 98.15%, while the HEF implementation achieved up to 91.67% under favorable traffic conditions. Hardware acceleration increased processing speed from 2.91 FPS to 18.12 FPS (approximately 6× faster) and reduced average inference latency from 320.41 ms to 27.51 ms per frame. However, quantization reduced sensitivity under challenging traffic conditions, especially for small and distant vehicles. Overall, the study highlights a clear trade-off between accuracy and speed and concludes that hardware-accelerated edge AI is suitable for real-time traffic monitoring on resource-constrained devices while maintaining acceptable reliability.