Easy. We see the set of flights. I've coupled the origins and destinations together here:
Your test only increments LAXd in the circumstance that BOTH the origin and the destination is LAX.
if isequal(origins(i),m) && isequal(Destinations(i),m)
Otherwise, LAXd is set to zero. Personally, I'm not surprised that no flights both start and end at LAX. It would be a quick flight, but hardly worth the effort. I wonder what such a flight would cost anyway?
I wonder if possibly you wanted to count if EITHER the origin OR the destination is LAX? In that case, the fix is trivial. Just use the or operator, thus ||, not &&. Or possibly LAXd only counts the number of flights that end at LAX. Again, pretty simple. You just need to use the correct test.