@Override
	public int count() {
		String query = "SELECT COUNT(id) AS nb FROM computer";
		ResultSet results = null;
		int count = 0;
		Connection connect = ConnectionMySql.getInstance();
		
		try (Statement stmt = connect.createStatement()){
			
			results = stmt.executeQuery(query);
			
			while (results.next()) {
				count = results.getInt("nb");
			}
		} catch (SQLException e) {
			e.printStackTrace();
		} finally {
			if (connect!=null) {
				try {
					connect.close();
				} catch (SQLException e) {}
			}
			
			if (results!=null) {
				try {
					results.close();
				} catch (SQLException e) {}
			}
		}
		
		return count;
	}