intersections of real algebraic sets (a bezout-type question) This question arose when I was trying to understand the Guth-Katz paper on Erdos distance problem, namely, related to Proof of Lemma 2.9 in http://arxiv.org/abs/1011.4105. The proof of that lemma is probably wrong (or incomplete) as written in the version I linked, although the lemma itself is of course true. The thing is I don't have any background in algebraic geometry and I'm sure the question will be trivial for experts,  but please reply to it using as simple vocabulary as possible :)
What Lemma 2.9 says is basically the following. We have two families of lines in $R^3$. The first one is a ruling of a regulus (since the notion of regulus is a bit obscure, we can assume for simplicity it's just a hyperboloid), which is a 1-dimensional algebraic set of lines. The second one is a certain 2-dimensional algebraic family of lines in $R^3$ that is 'generic' in some sense (for each point in the plane we have one line from this family and the lines are pairwise skew; more precisely, our family is $\mathcal L_p'= \{L_{pq}:q\in R^2\}$ where $p\in R^2$ is fixed and the exact formula for $L_{pq}$ is given on page 8 of http://arxiv.org/PS_cache/arxiv/pdf/1011/1011.4105v3.pdf). The lemma states that if these two families share many lines (take any constant you wish) then the first one must be fully contained in the second one. 
Supposing we can somehow express these sets of lines as algebraic sets in some $R^n$, then the problem boils down to showing a statement of roughly this form:
(the numbers below are chosen arbitrarily just to make the question more concrete)

Let $p$ and $q$ be two real
  polynomials of 10 variables, of
  degrees at most 20, such that $p$ is
  irreducible, and let their zero sets
  be $P,Q\subset R^{10}$. Suppose $P$ is
  1-dimensional and $Q$ is 2-dimensional. Then I would like to claim the following: if $P\cap Q$
  contains at least a million points,
  then $P$ must be a subset of $Q$.

First question: is the above reasoning correct and how is the theorem on which it's based called? I would like to see the simplest possible formulation of a general theorem that treats such cases (I would guess it's some Bezout-type theorem, but Bezout's theorem from http://en.wikipedia.org/wiki/B%C3%A9zout%27s_theorem doesn't quite do the job). if it's wrong then what would be a natural assumption (instead of irreducibility of $p$), that would save the statement?
EDIT: It turned out (see below the example by algori) the irreducibility condition is not the right one. So we are looking for some other additional conditions for the two sets that would make them satisfy the statement (and that are satisfied for our initial sets from Lemma).
Second question : we used above the terms '1- and 2-dimensional'. I cannot really find a definition of the dimension that would be completely elementary, so I wonder whether the above reasoning is correct if we assume the dimension is definied as follows:
a real algebraic set $A\subset R^n$ has dimension $k$ if it contains a subset homeomorphic to the $k$-dimensional ball and doesn't contain a subset homeomorphic to the $(k+1)$-dimensional ball?
NOTE: In fact, the initial motivation for this question (Proof of Lemma 2.9 by Guth and Katz) expired a long time ago, as I realized the above approach is not the right one (the lemma can actually be shown in a really clean way). For that reason, I voted to close this question. 
 A: Let me address the first question of the posting. One of the problem with real algebraic varieties is that every algebraic set is a "hypersurface" of sorts: it is the zero locus of a single polynomial.
So for $x=(x_1,\ldots, x_n)$ set $$q(x)=x_1^2+\cdots+x_{n-2}^2, f(x)=x_1^2+\cdots +x_{n-1}^2, g(x)=x_2^2+\cdots+ x_n^2,$$ 
$$f_1(x)=x_1^4+\cdots +x_{n-1}^4, g_1(x)=x_2^4+\cdots+ x_n^4.$$ 
The polynomial $q$ defines a 2-plane, both $f$ and $f_1$ define a line inside the plane and both $g$ and $g_1$ define a point not in the plane. Now take $p=fg+f_1 g_1$. The zero locus of $p$ is 1-dimensional, is not included in the zero locus of $q$ but has an infinite intersection with it. The irreducibility of $p$ (for $n\geq 4$) can be checked by restricting to the 3-plane defined by $x_{>3}=0$ and then using Maple.
A: A personal preference, undoubtedly, but I find that a differential geometry point of view can really help with the questions you're asking.
Dimension: Any semialgebraic set can be decomposed (non-uniquely) as a union of smooth manifolds (stratification), and you can always define the dimension as the maximal dimension that occurs in your decomposition. It does not depend of the decomposition. Of course, there are other ways of defining dimension, especially for varieties. But note that your set can have smooth points of varying dimensions (e.g. Whitney's umbrella or Cartan's umbrella).
Bézout-type results: There are many in real algebraic geometry, all made the more complicated by the fact that real roots don't always exist, of course. In your case, the result would follow from the fact that there are effective bounds on the number of connected components of intersections of algebraic varieties (and other semi-algebraic sets) in terms of the defining equations. The best bounds come from the critical point method, which is an efficient algorithm to produce one point per connected component, based on finding critical points of fairly simple Morse functions (e.g. generic projections or distance from a generic point). The bounds come from the Bézout inequality applied to polynomial systems defining those critical points. So a couple of derivatives of your polynomials will show up, and having a million points is complete overkill in your case, provided that you can guarantee that the intersection must be 0-dimensional when $P$ is not contained in $Q$  (which should be the case here). (oops! I was thinking of the wrong dimension!)
Added later: See section 12.6 of the book by Basu-Pollack-Roy for an exposition of the critical method. It is downloadable free of charge at the link.
