A mathematical minded scientist researched on the heart diseases of dolphins and recorded his finding in the coded language as "maximum number of heart attacks a dolphin can survive is equal to the number of sharp turns without jump in the graph of $f(x)=\frac{\tan x+\cot x}{2}-\left|\frac{\tan x-\cot x}{2}\right| "$ (where $0<x<$
$2 \pi$ ). Try to decode his message and find the minimum number of heart attacks that will definitely result in the death of a dolphin.
(a) 2
(b) 3
(c) 4
(d) 5