If i understand you correctly, you are asking if DFS and BFS are algorithm to check if Graph is connected.
If that was your question, then Yes.
BFS, DFS as you can read at wiki, are excellent O(n) solutions for checking if Graph is connected.
This can be done, but increment every new vertex you encounter and then checking if it equals for the given graph vertex list count.