With the right focal length, 2MP is more than sufficient.
Most here feel that 4MP is the sweet spot.
8MP suffers from not having varifocals, so the effective distance of a 2.8 or 3.6mm 8MP is roughly the same as a 4MP.
Most go by this chart. Anything in green is what you want:
View attachment 236864
That is why in
The Importance of Focal Length over MP in camera selection thread I posted above, it has the cameras we commonly recommend along with the suggested distance for IDENTIFY for each camera model.
DORI (Detect, Observe, Recognize, Identify) numbers are provided for each camera in their specs.
DORI is a nice tool in the tool box, but these are under ideal situations and real world experiences of DORI is that those numbers are established by the manufacturer and are based on best case scenarios like an object not moving and ideal light conditions.
Real world you should cut them in half during daytime and cut that half in half or more at night time.
Our long time resident camera expert Wildcat ran the Dahua 4K/X 8MP 1/1.2" sensor thru the paces. Keep in mind this 4K/X camera is incredible.
He had the 3.6mm version and here is the screenshot from 40 feet in the ideal daylight and standing still, which based on DORI numbers is the supposed IDENTIFY distance for this camera with the 3.6mm lens and I think most of would agree that this is not IDENTIFY quality, even if digitally zoomed in:
View attachment 236862
I have the 4K/X and 4K/T and they are incredible cameras, but I wouldn't use it for IDENTIFY past 15-20 feet, or half of what the DORI number is.