The answer is 4. The argument is the following. Let $L$ be such a line. Each of three quadrics intersects $L$ in two given points. Consider the pencil of quadrics which also contain $p$. Then these intersect $L$ in at least 3 points, hence contain $L$. Vice versa, if $L$ i a line passing through $p$ and contained in the intersection of that pencil then it intersects $S$ in 2 points.
Consider the tangent space to the intersection of two quadrics passing through $p$. This is $P^3 \subset P^5$. It is clear that each line we are interested in is contained in this $P^3$. The 2 quadrics intersect this $P^3$ in a quadratic cone with vertex in $p$. The bases of these cones are two conics in $P^2$. They intersect in 4 points and give the 4 lines.