They shouldn't have the same number of records.
catalog_category_product contains the links you create in the backend. Here is an example.
Let's say you have the following category structure. Using category ids:
And in the backed you associate the product with id
99 to the category with id 6.
catalog_category_product you will have:
category_id = 6
product_id = 99
position = 0 (or whatever)
Let's say category 5 is anchor and category 2 is root. After reindexing you will see in
catalog_category_product_index you will have 3 records for each store view where the product is available:
2 |99 |P1 |1 |1 |4
5 |99 |P2 |1 |1 |4
6 |99 |P3 |0 |1 |4
P1, P2, P3 are the product positions.See how they are calculated in here.
is_parent is 0 if the product is directly related to the category and 1 if it's related to a child category (I'm not 100% sure about this).
Also, from the
_index table only enabled products appear.