The conditional probability of, for example, an X given a red object is the number of red X's divided by the number of red objects.