What is the minimum number of data to create a function?
There are two issues:


Linear regression might be simple to calculate, but it's not sure that the relation between your variables is actually linear. If not, sometimes this simplification is ok because there's not too much variation, but sometime it's completely wrong.
There's no general minimum number of instances valid for every case. Generally the more complex the relation one wants to represent, the more instances one needs.


I'd suggest you start by plotting your data: visualizing the relation between the variables should tell you whether linear regression is a good option, and seeing how scattered your points are should tell you whether you have enough instances.