<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def count_true_positive(truth, recommend):
 """Count number of true positives from given sets of samples. Args: truth (numpy 1d array):
 Set of truth samples. recommend (numpy 1d array):
 Ordered set of recommended samples. Returns: int: Number of true positives. """

    tp = 0
    for r in recommend:
        if r in truth:
            tp += 1
    return tp