How to create a relatively complex MySQL query
If I understand then this is what you want:

SELECT   m.vlanID, v.vlan_name, m.interfaceName, count(m.macAddress) as mac, n.nd_name
FROM     macs m, network_devices n, vlans v
WHERE    n.nd_ip_address = m.ipAddr
AND      m.vlanID        = v.vlan_id
GROUP BY m.vlanID, v.vlan_name, m.interfaceName, n.nd_name
ORDER BY m.vlanID