Sexual relations between adults and children are illegal; it is not ‘just a number’.
If the ages are 17 and 24 then at worst there could be an imbalance of power and maturity that could make the relationship problematic and potentially abusive, but it is definitely not pedophilia.