Extract the count of particular macro block types(I, P and S) from the frames in the video
There are several tools to analyze video streams which which can provide slice and macroblock level information:


Intel Video Pro Analyzer
Tektronix Video Analyzer 
H264bitstream
ffmpeg (page Analyzing Macroblock Types)
Avidemux


From How extract Intra-Prediction modes out of h264 stream, it seems that ffmpeg or ffprobe can do a lot of jobs.