public int selectCount(BoardModel boardModel) {
		int totalCount = 0;
		String searchType = boardModel.getSearchType();
		String searchText = boardModel.getSearchText();
		String whereSQL = "";
		try {
			// 검색어 쿼리문 생성
			if (!"".equals(searchText)) {
				if ("ALL".equals(searchType)) {
					whereSQL = " WHERE SUBJECT LIKE CONCAT('%',?,'%') OR WRITER LIKE CONCAT('%',?,'%') OR CONTENTS LIKE CONCAT('%',?,'%') ";
				} else if ("SUBJECT".equals(searchType)) {
					whereSQL = " WHERE SUBJECT LIKE CONCAT('%',?,'%') ";
				} else if ("WRITER".equals(searchType)) {
					whereSQL = " WHERE WRITER LIKE CONCAT('%',?,'%') ";
				} else if ("CONTENTS".equals(searchType)) {
					whereSQL = " WHERE CONTENTS LIKE CONCAT('%',?,'%') ";
				}
			}
			// 데이터베이스 객체 생성
			Class.forName(this.JDBC_DRIVER);
			this.conn = DriverManager.getConnection(this.DB_URL, this.DB_ID, this.DB_PWD);
			// 게시물의 총 수를 얻는 쿼리 실행
			this.pstmt = this.conn.prepareStatement("SELECT COUNT(NUM) AS TOTAL FROM BOARD" + whereSQL);
			if (!"".equals(whereSQL)) {
				if ("ALL".equals(searchType)) {
					this.pstmt.setString(1, searchText);
					this.pstmt.setString(2, searchText);
					this.pstmt.setString(3, searchText);
				} else {
					this.pstmt.setString(1, searchText);
				}
			}
			this.rs = this.pstmt.executeQuery();
			if (this.rs.next()) {
				totalCount = this.rs.getInt("TOTAL");
			}
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			// 사용한 객체 종료
			close(this.rs, this.pstmt, this.conn);
		}
		return totalCount;
	}